{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "from pyecharts.charts import Geo\n",
    "from pyecharts.charts import Map\n",
    "from pyecharts import options as opts\n",
    "from pyecharts.globals import ChartType, SymbolType,ThemeType"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>排名</th>\n",
       "      <th>居住地</th>\n",
       "      <th>人数</th>\n",
       "      <th>人数变化</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>北京</td>\n",
       "      <td>286</td>\n",
       "      <td>-7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>深圳</td>\n",
       "      <td>191</td>\n",
       "      <td>-2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>上海</td>\n",
       "      <td>167</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>杭州</td>\n",
       "      <td>121</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>广州</td>\n",
       "      <td>90</td>\n",
       "      <td>-1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>6</td>\n",
       "      <td>香港</td>\n",
       "      <td>53</td>\n",
       "      <td>-1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>7</td>\n",
       "      <td>苏州</td>\n",
       "      <td>39</td>\n",
       "      <td>-3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>8</td>\n",
       "      <td>成都</td>\n",
       "      <td>39</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>9</td>\n",
       "      <td>佛山</td>\n",
       "      <td>36</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>10</td>\n",
       "      <td>宁波</td>\n",
       "      <td>29</td>\n",
       "      <td>-5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>11</td>\n",
       "      <td>东莞</td>\n",
       "      <td>28</td>\n",
       "      <td>-3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>11</td>\n",
       "      <td>紹兴</td>\n",
       "      <td>28</td>\n",
       "      <td>-1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>13</td>\n",
       "      <td>厦门</td>\n",
       "      <td>27</td>\n",
       "      <td>-1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>14</td>\n",
       "      <td>无锡</td>\n",
       "      <td>26</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>15</td>\n",
       "      <td>南京</td>\n",
       "      <td>25</td>\n",
       "      <td>-1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>16</td>\n",
       "      <td>重庆</td>\n",
       "      <td>24</td>\n",
       "      <td>-4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>17</td>\n",
       "      <td>福州</td>\n",
       "      <td>22</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>17</td>\n",
       "      <td>天津</td>\n",
       "      <td>22</td>\n",
       "      <td>-3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>19</td>\n",
       "      <td>长沙</td>\n",
       "      <td>20</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>20</td>\n",
       "      <td>烟台</td>\n",
       "      <td>18</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>21</td>\n",
       "      <td>武汉</td>\n",
       "      <td>17</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>21</td>\n",
       "      <td>嘉兴</td>\n",
       "      <td>17</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>21</td>\n",
       "      <td>常州</td>\n",
       "      <td>17</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>21</td>\n",
       "      <td>温州</td>\n",
       "      <td>17</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>25</td>\n",
       "      <td>台州</td>\n",
       "      <td>16</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>26</td>\n",
       "      <td>青岛</td>\n",
       "      <td>14</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>26</td>\n",
       "      <td>郑州</td>\n",
       "      <td>14</td>\n",
       "      <td>-3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>28</td>\n",
       "      <td>合肥</td>\n",
       "      <td>13</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>29</td>\n",
       "      <td>泉州</td>\n",
       "      <td>12</td>\n",
       "      <td>-4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>29</td>\n",
       "      <td>汕头</td>\n",
       "      <td>12</td>\n",
       "      <td>-3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>31</td>\n",
       "      <td>珠海</td>\n",
       "      <td>11</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>32</td>\n",
       "      <td>鄂尔多斯</td>\n",
       "      <td>10</td>\n",
       "      <td>-4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>32</td>\n",
       "      <td>湖州</td>\n",
       "      <td>10</td>\n",
       "      <td>-1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33</th>\n",
       "      <td>34</td>\n",
       "      <td>南通</td>\n",
       "      <td>9</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>34</th>\n",
       "      <td>34</td>\n",
       "      <td>沈阳</td>\n",
       "      <td>9</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>35</th>\n",
       "      <td>34</td>\n",
       "      <td>太原</td>\n",
       "      <td>9</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>36</th>\n",
       "      <td>34</td>\n",
       "      <td>云浮</td>\n",
       "      <td>9</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37</th>\n",
       "      <td>38</td>\n",
       "      <td>保定</td>\n",
       "      <td>8</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38</th>\n",
       "      <td>38</td>\n",
       "      <td>东营</td>\n",
       "      <td>8</td>\n",
       "      <td>-4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>39</th>\n",
       "      <td>38</td>\n",
       "      <td>廊坊</td>\n",
       "      <td>8</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>40</th>\n",
       "      <td>38</td>\n",
       "      <td>连云港</td>\n",
       "      <td>8</td>\n",
       "      <td>-1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>41</th>\n",
       "      <td>38</td>\n",
       "      <td>石家庄</td>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>42</th>\n",
       "      <td>38</td>\n",
       "      <td>西安</td>\n",
       "      <td>8</td>\n",
       "      <td>-2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>43</th>\n",
       "      <td>38</td>\n",
       "      <td>中山</td>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    排名   居住地   人数  人数变化\n",
       "0    1    北京  286    -7\n",
       "1    2    深圳  191    -2\n",
       "2    3    上海  167     7\n",
       "3    4    杭州  121     1\n",
       "4    5    广州   90    -1\n",
       "5    6    香港   53    -1\n",
       "6    7    苏州   39    -3\n",
       "7    8    成都   39     5\n",
       "8    9    佛山   36     1\n",
       "9   10    宁波   29    -5\n",
       "10  11    东莞   28    -3\n",
       "11  11    紹兴   28    -1\n",
       "12  13    厦门   27    -1\n",
       "13  14    无锡   26     4\n",
       "14  15    南京   25    -1\n",
       "15  16    重庆   24    -4\n",
       "16  17    福州   22     3\n",
       "17  17    天津   22    -3\n",
       "18  19    长沙   20     5\n",
       "19  20    烟台   18     1\n",
       "20  21    武汉   17     1\n",
       "21  21    嘉兴   17     0\n",
       "22  21    常州   17     1\n",
       "23  21    温州   17     1\n",
       "24  25    台州   16     0\n",
       "25  26    青岛   14     0\n",
       "26  26    郑州   14    -3\n",
       "27  28    合肥   13     3\n",
       "28  29    泉州   12    -4\n",
       "29  29    汕头   12    -3\n",
       "30  31    珠海   11     0\n",
       "31  32  鄂尔多斯   10    -4\n",
       "32  32    湖州   10    -1\n",
       "33  34    南通    9     0\n",
       "34  34    沈阳    9     3\n",
       "35  34    太原    9     6\n",
       "36  34    云浮    9     0\n",
       "37  38    保定    8     3\n",
       "38  38    东营    8    -4\n",
       "39  38    廊坊    8     0\n",
       "40  38   连云港    8    -1\n",
       "41  38   石家庄    8     1\n",
       "42  38    西安    8    -2\n",
       "43  38    中山    8     1"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.read_csv(r\"Distribution of residence.csv\") \n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[('北京', 286),\n",
       " ('深圳', 191),\n",
       " ('上海', 167),\n",
       " ('杭州', 121),\n",
       " ('广州', 90),\n",
       " ('香港', 53),\n",
       " ('苏州', 39),\n",
       " ('成都', 39),\n",
       " ('佛山', 36),\n",
       " ('宁波', 29),\n",
       " ('东莞', 28),\n",
       " ('紹兴', 28),\n",
       " ('厦门', 27),\n",
       " ('无锡', 26),\n",
       " ('南京', 25),\n",
       " ('重庆', 24),\n",
       " ('福州', 22),\n",
       " ('天津', 22),\n",
       " ('长沙', 20),\n",
       " ('烟台', 18),\n",
       " ('武汉', 17),\n",
       " ('嘉兴', 17),\n",
       " ('常州', 17),\n",
       " ('温州', 17),\n",
       " ('台州', 16),\n",
       " ('青岛', 14),\n",
       " ('郑州', 14),\n",
       " ('合肥', 13),\n",
       " ('泉州', 12),\n",
       " ('汕头', 12),\n",
       " ('珠海', 11),\n",
       " ('鄂尔多斯', 10),\n",
       " ('湖州', 10),\n",
       " ('南通', 9),\n",
       " ('沈阳', 9),\n",
       " ('太原', 9),\n",
       " ('云浮', 9),\n",
       " ('保定', 8),\n",
       " ('东营', 8),\n",
       " ('廊坊', 8),\n",
       " ('连云港', 8),\n",
       " ('石家庄', 8),\n",
       " ('西安', 8),\n",
       " ('中山', 8)]"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "城市富豪居住地人数 = list(zip(list(df.居住地),list(df.人数)))\n",
    "城市富豪居住地人数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['北京',\n",
       " '深圳',\n",
       " '上海',\n",
       " '杭州',\n",
       " '广州',\n",
       " '香港',\n",
       " '苏州',\n",
       " '成都',\n",
       " '佛山',\n",
       " '宁波',\n",
       " '东莞',\n",
       " '紹兴',\n",
       " '厦门',\n",
       " '无锡',\n",
       " '南京',\n",
       " '重庆',\n",
       " '福州',\n",
       " '天津',\n",
       " '长沙',\n",
       " '烟台',\n",
       " '武汉',\n",
       " '嘉兴',\n",
       " '常州',\n",
       " '温州',\n",
       " '台州',\n",
       " '青岛',\n",
       " '郑州',\n",
       " '合肥',\n",
       " '泉州',\n",
       " '汕头',\n",
       " '珠海',\n",
       " '鄂尔多斯',\n",
       " '湖州',\n",
       " '南通',\n",
       " '沈阳',\n",
       " '太原',\n",
       " '云浮',\n",
       " '保定',\n",
       " '东营',\n",
       " '廊坊',\n",
       " '连云港',\n",
       " '石家庄',\n",
       " '西安',\n",
       " '中山']"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "keys = list(df.居住地)\n",
    "keys"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[286,\n",
       " 191,\n",
       " 167,\n",
       " 121,\n",
       " 90,\n",
       " 53,\n",
       " 39,\n",
       " 39,\n",
       " 36,\n",
       " 29,\n",
       " 28,\n",
       " 28,\n",
       " 27,\n",
       " 26,\n",
       " 25,\n",
       " 24,\n",
       " 22,\n",
       " 22,\n",
       " 20,\n",
       " 18,\n",
       " 17,\n",
       " 17,\n",
       " 17,\n",
       " 17,\n",
       " 16,\n",
       " 14,\n",
       " 14,\n",
       " 13,\n",
       " 12,\n",
       " 12,\n",
       " 11,\n",
       " 10,\n",
       " 10,\n",
       " 9,\n",
       " 9,\n",
       " 9,\n",
       " 9,\n",
       " 8,\n",
       " 8,\n",
       " 8,\n",
       " 8,\n",
       " 8,\n",
       " 8,\n",
       " 8]"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "values = list(df.人数)\n",
    "values"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', 'china':'https://assets.pyecharts.org/assets/maps/china'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"ebdd0b0442954b95b4f094295740b75f\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', 'china'], function(echarts) {\n",
       "                var chart_ebdd0b0442954b95b4f094295740b75f = echarts.init(\n",
       "                    document.getElementById('ebdd0b0442954b95b4f094295740b75f'), 'white', {renderer: 'canvas'});\n",
       "                var option_ebdd0b0442954b95b4f094295740b75f = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"map\",\n",
       "            \"name\": \"\\u4eba\\u6570\",\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"mapType\": \"china\",\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5317\\u4eac\",\n",
       "                    \"value\": 286\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6df1\\u5733\",\n",
       "                    \"value\": 191\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e0a\\u6d77\",\n",
       "                    \"value\": 167\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u676d\\u5dde\",\n",
       "                    \"value\": 121\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e7f\\u5dde\",\n",
       "                    \"value\": 90\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9999\\u6e2f\",\n",
       "                    \"value\": 53\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u82cf\\u5dde\",\n",
       "                    \"value\": 39\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6210\\u90fd\",\n",
       "                    \"value\": 39\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4f5b\\u5c71\",\n",
       "                    \"value\": 36\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5b81\\u6ce2\",\n",
       "                    \"value\": 29\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e1c\\u839e\",\n",
       "                    \"value\": 28\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7d39\\u5174\",\n",
       "                    \"value\": 28\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u53a6\\u95e8\",\n",
       "                    \"value\": 27\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u65e0\\u9521\",\n",
       "                    \"value\": 26\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5357\\u4eac\",\n",
       "                    \"value\": 25\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u91cd\\u5e86\",\n",
       "                    \"value\": 24\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u798f\\u5dde\",\n",
       "                    \"value\": 22\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5929\\u6d25\",\n",
       "                    \"value\": 22\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u957f\\u6c99\",\n",
       "                    \"value\": 20\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u70df\\u53f0\",\n",
       "                    \"value\": 18\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6b66\\u6c49\",\n",
       "                    \"value\": 17\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5609\\u5174\",\n",
       "                    \"value\": 17\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e38\\u5dde\",\n",
       "                    \"value\": 17\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6e29\\u5dde\",\n",
       "                    \"value\": 17\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u53f0\\u5dde\",\n",
       "                    \"value\": 16\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9752\\u5c9b\",\n",
       "                    \"value\": 14\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u90d1\\u5dde\",\n",
       "                    \"value\": 14\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5408\\u80a5\",\n",
       "                    \"value\": 13\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6cc9\\u5dde\",\n",
       "                    \"value\": 12\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c55\\u5934\",\n",
       "                    \"value\": 12\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u73e0\\u6d77\",\n",
       "                    \"value\": 11\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9102\\u5c14\\u591a\\u65af\",\n",
       "                    \"value\": 10\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6e56\\u5dde\",\n",
       "                    \"value\": 10\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5357\\u901a\",\n",
       "                    \"value\": 9\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c88\\u9633\",\n",
       "                    \"value\": 9\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u592a\\u539f\",\n",
       "                    \"value\": 9\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e91\\u6d6e\",\n",
       "                    \"value\": 9\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4fdd\\u5b9a\",\n",
       "                    \"value\": 8\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e1c\\u8425\",\n",
       "                    \"value\": 8\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5eca\\u574a\",\n",
       "                    \"value\": 8\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8fde\\u4e91\\u6e2f\",\n",
       "                    \"value\": 8\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u77f3\\u5bb6\\u5e84\",\n",
       "                    \"value\": 8\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u897f\\u5b89\",\n",
       "                    \"value\": 8\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e2d\\u5c71\",\n",
       "                    \"value\": 8\n",
       "                }\n",
       "            ],\n",
       "            \"roam\": true,\n",
       "            \"zoom\": 1,\n",
       "            \"showLegendSymbol\": true,\n",
       "            \"emphasis\": {}\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u4eba\\u6570\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\\u4eba\\u6570\": true\n",
       "            },\n",
       "            \"show\": true\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u57ce\\u5e02\\u5bcc\\u8c6a\\u5c45\\u4f4f\\u5730\\u4eba\\u6570\"\n",
       "        }\n",
       "    ],\n",
       "    \"visualMap\": {\n",
       "        \"show\": true,\n",
       "        \"type\": \"continuous\",\n",
       "        \"min\": 0,\n",
       "        \"max\": 50,\n",
       "        \"inRange\": {\n",
       "            \"color\": [\n",
       "                \"#50a3ba\",\n",
       "                \"#eac763\",\n",
       "                \"#d94e5d\"\n",
       "            ]\n",
       "        },\n",
       "        \"calculable\": true,\n",
       "        \"splitNumber\": 5,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"showLabel\": true\n",
       "    }\n",
       "};\n",
       "                chart_ebdd0b0442954b95b4f094295740b75f.setOption(option_ebdd0b0442954b95b4f094295740b75f);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x246caa4c668>"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "def map_visualmap() -> Map:\n",
    "    c = (\n",
    "        Map()\n",
    "        .add(\"人数\",城市富豪居住地人数, \"china\")\n",
    "        .set_global_opts(\n",
    "            title_opts=opts.TitleOpts(title=\"城市富豪居住地人数\"),\n",
    "            visualmap_opts=opts.VisualMapOpts(max_=50),\n",
    "        )\n",
    "    )\n",
    "    return c\n",
    "map_visualmap().render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
